home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / gzip124.gz / gzip124 / gzip-1.2.4 / vms / Makefile.gcc < prev    next >
Makefile  |  1993-06-22  |  4KB  |  132 lines

  1. # Makefile for gzip (GNU zip)    -*- Indented-Text -*-
  2. # Copyright (C) 1992-1993 Jean-loup Gailly and the Free Software Foundation
  3. # VMS version made by Klaus Reimann <kr@cip.physik.uni-stuttgart.de>,
  4. # revised by Roland B Roberts <roberts@nsrl31.nsrl.rochester.edu>.
  5. # This version is for gcc.
  6.  
  7. # After constructing gzip.exe with this Makefile, you should set up
  8. # symbols for gzip.exe.  Edit the example below, changing
  9. # "disk:[directory]" as appropriate.
  10. #
  11. # $ gzip   == "$disk:[directory]gzip.exe"
  12. # $ gunzip == "$disk:[directory]gunzip.exe"
  13. # $ zcat   == "$disk:[directory]zcat.exe"
  14.  
  15.  
  16. # This program is free software; you can redistribute it and/or modify
  17. # it under the terms of the GNU General Public License as published by
  18. # the Free Software Foundation; either version 2, or (at your option)
  19. # any later version.
  20.  
  21. # This program is distributed in the hope that it will be useful,
  22. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  24. # GNU General Public License for more details.
  25.  
  26. # You should have received a copy of the GNU General Public License
  27. # along with this program; if not, write to the Free Software
  28. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  29.  
  30. #### Start of system configuration section. ####
  31.  
  32. CC = gcc
  33. LINK = link
  34.  
  35. CFLAGS =
  36. # CFLAGS = /warning
  37. LDFLAGS =
  38.  
  39. # Things you might add to DEFS
  40. # -DDIRENT              Use <dirent.h>  for recursion (-r)
  41. # -DSYSDIR              Use <sys/dir.h> for recursion (-r)
  42. # -DSYSNDIR             Use <sys/ndir.h> for recursion (-r)
  43. # -DNDIR                Use <ndir.h> for recursion (-r)
  44. # -DSTDC_HEADERS        Use <stdlib.h>
  45. # -DHAVE_UNISTD_H    Use <unistd.h>
  46. # -DNO_UTIME_H        Don't use <utime.h>
  47. # -DHAVE_SYSUTIME_H    Use <sys/utime.h>
  48. # -DNO_MEMORY_H         Don't use <memory.h>. Not needed if STDC_HEADERS.
  49. # -DNO_STRING_H         Use strings.h, not string.h. Not needed if STDC_HEADERS
  50. # -DRETSIGTYPE=int      Define this if signal handlers must return an int.
  51. # -DNO_SYMLINK          OS defines S_IFLNK but does not support symbolic links
  52. # -DNO_MULTIPLE_DOTS    System does not allow file names with multiple dots
  53. # -DNO_UTIME        System does not support setting file modification time
  54. # -DNO_CHOWN        System does not support setting file owner
  55. # -DNO_DIR        System does not support readdir()
  56. # -DPROTO        Force function prototypes even if __STDC__ not defined
  57. # -DASMV        Use asm version match.S
  58. # -DMSDOS        MSDOS specific
  59. # -DOS2            OS/2 specific
  60. # -DVAXC        Vax/VMS with Vax C compiler
  61. # -DVMS            Vax/VMS with gcc
  62. # -DDEBUG        Debug code
  63. # -DDYN_ALLOC        Use dynamic allocation of large data structures
  64. # -DMAXSEG_64K        Maximum array size is 64K (for 16 bit system)
  65. # -DRECORD_IO           read() and write() are rounded to record sizes.
  66. # -DNO_STDIN_FSTAT      fstat() is not available on stdin
  67. # -DNO_SIZE_CHECK       stat() does not give a reliable file size
  68.  
  69. DEFS = /define=(VMS)
  70. LIBS = #@LIBS@
  71.  
  72. X=.exe
  73. O=.obj
  74.  
  75. # additional assembly sources for particular systems be required.
  76. OBJA = #@OBJA@
  77.  
  78. #### End of system configuration section. ####
  79.  
  80. OBJS = gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O util$O \
  81.        crypt$O lzw$O unlzw$O unpack$O unlzh$O getopt$O vms$O $(OBJA)
  82.  
  83. # --- rules ---
  84.  
  85. *$O:    *.c
  86.     $(CC) $* $(DEFS) $(CFLAGS)
  87. #    create sys$output
  88. #        $(CC) $* $(DEFS) $(CFLAGS)$
  89.  
  90. default:  all
  91.  
  92. all:    gzip$X #zcmp zdiff zmore znew
  93.  
  94. gzip$X : $(OBJS) #Makefile
  95.   linkobjs:=$(OBJS)
  96.   Schleife:
  97.     p = f$locate(" ",linkobjs)
  98.     if p .lt. f$length(linkobjs)
  99.         then    linkobjs[p,1]:=","
  100.             goto Schleife
  101.     endif
  102.   write sys$output "linking ''linkobjs'"
  103.   $(LINK) $(LDFLAGS) /exec=gzip$X  'linkobjs',sys$input/opt
  104.     GNU_CC:[000000]GCCLIB/LIB,SYS$LIBRARY:VAXCRTL/SHARE $
  105.  
  106. #  Create a hard link.  To remove both files, use "make clean".  Using a hard
  107. #  link saves disk space, by the way.  Note, however, that copying a hard link
  108. #  copies the data, not just the link.  Therefore, set up the link in the
  109. #  directory in which the executable is to reside, or else rename (move) the
  110. #  executables into the directory.
  111.   set file/enter=gunzip.exe gzip.exe
  112.   set file/enter=zcat.exe   gzip.exe
  113.  
  114.  
  115. clean:
  116.     set file/remove gunzip.exe;0
  117.     set file/remove zcat.exe;0
  118.     delete gzip.exe;0
  119.     delete *$O;0
  120.  
  121. # Actual build-related targets
  122.  
  123. gzip$O zip$O deflate$O trees$O bits$O unzip$O inflate$O: gzip.h tailor.h
  124. util$O lzw$O unlzw$O unpack$O unlzh$O crypt$O: gzip.h tailor.h
  125.  
  126. gzip$O unlzw$O: revision.h lzw.h
  127.  
  128. bits$O unzip$O util$O zip$O: crypt.h
  129.  
  130. gzip$O getopt$O: getopt.h
  131.